# 多线程：函数式创建线程
# 多线程模块
import threading as th
import time
# 唱歌
def sing(msg):
    while True:
        print(f"我在唱歌,{msg}")
        time.sleep(1)
# 跳舞
def dance(msg):
    while True:
        print(f"我在跳舞,{msg}")
        time.sleep(1)
if __name__ == '__main__':
    """
        sing_th = th.Thread(target=sing)
        dance_th = th.Thread(target=dance)
        # 启动线程
        # sing_th.start()
        # dance_th.start()
    """
    # 传参多线程（通过字典或者元组传递参数）
    sing_th = th.Thread(target=sing, args=("啦啦啦",))
    dance_th = th.Thread(target=dance, args=("别离生出花",))
    # 启动线程
    sing_th.start()
    dance_th.start()
